package com.wsw.ssh.system.action;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import com.wsw.common.action.BaseAction;
import com.wsw.common.util.IpUtil;

/**
 * 
 * 
 * File：UserAction.java title： Description: Copyright: Copyright (c) 2014
 * 
 * @author sw.wang
 * @version
 */
@Namespace("/base")
@Action(results = {
		@Result(name = "west", location = "/pages/layout/west.jsp"),
		@Result(name = "center", location = "/pages/layout/center.jsp"),
		@Result(name = "south", location = "/pages/layout/south.jsp"),
		@Result(name = "north", location = "/pages/layout/north.jsp") })
public class InitAction extends BaseAction<Object> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7654607563764424884L;

	private String ip;

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String initNorth() {
		ip = IpUtil.getIpAddr(getRequest());
		return "north";
	}

	public String initSouth() {
		return "south";
	}

	public String initCenter() {
		return "center";
	}

	public String initWest() throws Exception {
		return "west";
	}
}
